#![allow(unused_imports, non_snake_case, non_camel_case_types)]
use super::windows::*;
use super::*;

#[repr(C)]
pub struct IDWriteFontFileVtbl {
	pub parent: IUnknownVtbl,
	pub GetReferenceKey: unsafe extern "system" fn(This: *mut IDWriteFontFile, fontFileReferenceKey: *mut *const c_void, fontFileReferenceKeySize: *mut UINT32) -> HRESULT,
	pub GetLoader: unsafe extern "system" fn(This: *mut IDWriteFontFile, fontFileLoader: *mut *mut IDWriteFontFileLoader) -> HRESULT,
	pub Analyze: unsafe extern "system" fn(This: *mut IDWriteFontFile, isSupportedFontType: *mut BOOL, fontFileType: *mut DWRITE_FONT_FILE_TYPE, fontFaceType: *mut DWRITE_FONT_FACE_TYPE, numberOfFaces: *mut UINT32) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteFontFile {
	pub lpVtbl: *const IDWriteFontFileVtbl,
}
impl IDWriteFontFile {
	#[inline]
	pub unsafe fn GetReferenceKey(&self, fontFileReferenceKey: *mut *const c_void, fontFileReferenceKeySize: *mut UINT32) -> HRESULT {
		((*self.lpVtbl).GetReferenceKey)(self as *const _ as *mut _, fontFileReferenceKey, fontFileReferenceKeySize)
	}
	#[inline]
	pub unsafe fn GetLoader(&self, fontFileLoader: *mut *mut IDWriteFontFileLoader) -> HRESULT {
		((*self.lpVtbl).GetLoader)(self as *const _ as *mut _, fontFileLoader)
	}
	#[inline]
	pub unsafe fn Analyze(&self, isSupportedFontType: *mut BOOL, fontFileType: *mut DWRITE_FONT_FILE_TYPE, fontFaceType: *mut DWRITE_FONT_FACE_TYPE, numberOfFaces: *mut UINT32) -> HRESULT {
		((*self.lpVtbl).Analyze)(self as *const _ as *mut _, isSupportedFontType, fontFileType, fontFaceType, numberOfFaces)
	}
}
impl core::ops::Deref for IDWriteFontFile {
	type Target = IUnknown;
	#[inline]
	fn deref(&self) -> &IUnknown {
		unsafe { &*(self as *const IDWriteFontFile as *const IUnknown) }
	}
}
impl Interface for IDWriteFontFile {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0x739d886a, Data2: 0xcef5, Data3: 0x47dc, Data4: [0x87, 0x69, 0x1a, 0x8b, 0x41, 0xbe, 0xbb, 0xb0] }
	}
}

#[repr(C)]
pub struct IDWriteFontFileLoaderVtbl {
	pub parent: IUnknownVtbl,
	pub CreateStreamFromKey: unsafe extern "system" fn(This: *mut IDWriteFontFileLoader, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, fontFileStream: *mut *mut IDWriteFontFileStream) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteFontFileLoader {
	pub lpVtbl: *const IDWriteFontFileLoaderVtbl,
}
impl IDWriteFontFileLoader {
	#[inline]
	pub unsafe fn CreateStreamFromKey(&self, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, fontFileStream: *mut *mut IDWriteFontFileStream) -> HRESULT {
		((*self.lpVtbl).CreateStreamFromKey)(self as *const _ as *mut _, fontFileReferenceKey, fontFileReferenceKeySize, fontFileStream)
	}
}
impl core::ops::Deref for IDWriteFontFileLoader {
	type Target = IUnknown;
	#[inline]
	fn deref(&self) -> &IUnknown {
		unsafe { &*(self as *const IDWriteFontFileLoader as *const IUnknown) }
	}
}
impl Interface for IDWriteFontFileLoader {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0x727cad4e, Data2: 0xd6af, Data3: 0x4c9e, Data4: [0x8a, 0x08, 0xd6, 0x95, 0xb1, 0x1c, 0xaa, 0x49] }
	}
}

// #[repr(C)]
// pub struct IDWriteFontFileStreamVtbl {
// 	pub parent: IUnknownVtbl,
// 	pub ReadFileFragment: unsafe extern "system" fn(This: *mut IDWriteFontFileStream, fragmentStart: *mut *const c_void, fileOffset: UINT64, fragmentSize: UINT64, fragmentContext: *mut *mut c_void) -> HRESULT,
// 	pub ReleaseFileFragment: unsafe extern "system" fn(This: *mut IDWriteFontFileStream, fragmentContext: *mut c_void) -> (),
// 	pub GetFileSize: unsafe extern "system" fn(This: *mut IDWriteFontFileStream, fileSize: *mut UINT64) -> HRESULT,
// 	pub GetLastWriteTime: unsafe extern "system" fn(This: *mut IDWriteFontFileStream, lastWriteTime: *mut UINT64) -> HRESULT,
// }
// #[repr(C)]
// pub struct IDWriteFontFileStream {
// 	pub lpVtbl: *const IDWriteFontFileStreamVtbl,
// }
// impl IDWriteFontFileStream {
// 	#[inline]
// 	pub unsafe fn ReadFileFragment(&self, fragmentStart: *mut *const c_void, fileOffset: UINT64, fragmentSize: UINT64, fragmentContext: *mut *mut c_void) -> HRESULT {
// 		((*self.lpVtbl).ReadFileFragment)(self as *const _ as *mut _, fragmentStart, fileOffset, fragmentSize, fragmentContext)
// 	}
// 	#[inline]
// 	pub unsafe fn ReleaseFileFragment(&self, fragmentContext: *mut c_void) -> () {
// 		((*self.lpVtbl).ReleaseFileFragment)(self as *const _ as *mut _, fragmentContext)
// 	}
// 	#[inline]
// 	pub unsafe fn GetFileSize(&self, fileSize: *mut UINT64) -> HRESULT {
// 		((*self.lpVtbl).GetFileSize)(self as *const _ as *mut _, fileSize)
// 	}
// 	#[inline]
// 	pub unsafe fn GetLastWriteTime(&self, lastWriteTime: *mut UINT64) -> HRESULT {
// 		((*self.lpVtbl).GetLastWriteTime)(self as *const _ as *mut _, lastWriteTime)
// 	}
// }
// impl core::ops::Deref for IDWriteFontFileStream {
// 	type Target = IUnknown;
// 	#[inline]
// 	fn deref(&self) -> &IUnknown {
// 		unsafe { &*(self as *const IDWriteFontFileStream as *const IUnknown) }
// 	}
// }
// impl Interface for IDWriteFontFileStream {
// 	#[inline]
// 	fn uuidof() -> GUID {
// 		GUID { Data1: 0x6d4865fe, Data2: 0x0ab8, Data3: 0x4d91, Data4: [0x8f, 0x62, 0x5d, 0xd6, 0xbe, 0x34, 0xa3, 0xe0] }
// 	}
// }

#[repr(C)]
pub struct IDWriteLocalFontFileLoaderVtbl {
	pub parent: IDWriteFontFileLoaderVtbl,
	pub GetFilePathLengthFromKey: unsafe extern "system" fn(This: *mut IDWriteLocalFontFileLoader, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, filePathLength: *mut UINT32) -> HRESULT,
	pub GetFilePathFromKey: unsafe extern "system" fn(This: *mut IDWriteLocalFontFileLoader, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, filePath: *mut WCHAR, filePathSize: UINT32) -> HRESULT,
	pub GetLastWriteTimeFromKey: unsafe extern "system" fn(This: *mut IDWriteLocalFontFileLoader, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, lastWriteTime: *mut FILETIME) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteLocalFontFileLoader {
	pub lpVtbl: *const IDWriteLocalFontFileLoaderVtbl,
}
impl IDWriteLocalFontFileLoader {
	#[inline]
	pub unsafe fn GetFilePathLengthFromKey(&self, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, filePathLength: *mut UINT32) -> HRESULT {
		((*self.lpVtbl).GetFilePathLengthFromKey)(self as *const _ as *mut _, fontFileReferenceKey, fontFileReferenceKeySize, filePathLength)
	}
	#[inline]
	pub unsafe fn GetFilePathFromKey(&self, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, filePath: *mut WCHAR, filePathSize: UINT32) -> HRESULT {
		((*self.lpVtbl).GetFilePathFromKey)(self as *const _ as *mut _, fontFileReferenceKey, fontFileReferenceKeySize, filePath, filePathSize)
	}
	#[inline]
	pub unsafe fn GetLastWriteTimeFromKey(&self, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, lastWriteTime: *mut FILETIME) -> HRESULT {
		((*self.lpVtbl).GetLastWriteTimeFromKey)(self as *const _ as *mut _, fontFileReferenceKey, fontFileReferenceKeySize, lastWriteTime)
	}
}
impl core::ops::Deref for IDWriteLocalFontFileLoader {
	type Target = IDWriteFontFileLoader;
	#[inline]
	fn deref(&self) -> &IDWriteFontFileLoader {
		unsafe { &*(self as *const IDWriteLocalFontFileLoader as *const IDWriteFontFileLoader) }
	}
}
impl Interface for IDWriteLocalFontFileLoader {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0xb2d9f3ec, Data2: 0xc9fe, Data3: 0x4a11, Data4: [0xa2, 0xec, 0xd8, 0x62, 0x08, 0xf7, 0xc0, 0xa2] }
	}
}
